﻿namespace WhyWeNeedInterface.Serives
{
    public class GreetingService : IGreetingService
    {
        public string GetGreetingMessage(string name)
        {
            var hour = DateTime.Now.Hour;
            return hour switch
            {
                < 12 => $"Good Moring {name}",
                < 18 => $"Good Afternoon {name}",
                _ => $"Good Evening {name}"
            };
        }
    }
}